CMAKE_MINIMUM_REQUIRED(VERSION 3.16)

FILE(GLOB proto_files "*.proto")

### PROTO
PROTOBUF_GENERATE(
        APPEND_PATH
        LANGUAGE cpp
        OUT_VAR pb_gen
        PROTOC_OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}
        PROTOS ${proto_files}
)
ADD_LIBRARY(air_grpc_pb OBJECT ${pb_gen})
TARGET_LINK_LIBRARIES(air_grpc_pb
        protobuf::libprotobuf)
TARGET_INCLUDE_DIRECTORIES(air_grpc_pb
        PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
